﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" Culture="th-TH" uiCulture="th" AutoEventWireup="true" CodeBehind="PS_RetirementYear.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PS_RetirementYear" %>
<%@ Register src="../Controls/EmployeeTypeCombo.ascx" tagname="EmployeeTypeCombo" tagprefix="uc1" %>
<%@ Register src="../Controls/MasterYear.ascx" tagname="MasterYear" tagprefix="uc2" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
    <title>ตรวจสอบรายชื่อบุคลาที่เกษียณในแต่ละปี</title>
    
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">        
            <script type="text/javascript">
                
                function closeRadWindow(sender, args) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('CloseWindow');
                }

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
 
            </script>
        
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>            
            <telerik:AjaxSetting AjaxControlID="cmdFilter">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel4" />
                    <telerik:AjaxUpdatedControl ControlID="Panel7" />
                    <telerik:AjaxUpdatedControl ControlID="lblHeader" />
                    <telerik:AjaxUpdatedControl ControlID="lblZoneSeq" />                  
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>            
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
    <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <div class="moduleDivSlim1000">
                    <div class="moduleDivBottom1000">
                         <asp:Panel ID="PanelFilter" runat="server" Width="950px" ScrollBars="Auto">
                            <table >
                                    <tr>
                                        <td width="30">
                                        </td>
                                        <td align="right" >
                                            ประเภทบุคลากร :
                                        </td>
                                        <td>
                                            <uc1:EmployeeTypeCombo ID="cbEmployeeType" runat="server" />
                                        </td>
                                        <td align="right">
                                            ตั้งแต่ปีงบประมาณ :
                                        </td>
                                        <td>                                            
                                            <uc2:MasterYear ID="cbFromYear" runat="server" />
                                            
                                        </td>
                                       <td align="right">
                                            ถึงปีงบประมาณ :
                                        </td>
                                        <td>
                                            <uc2:MasterYear ID="cbToYear" runat="server" />
                                        </td>
                                       <td>
                                            <asp:Button ID="cmdFilter" runat="server" onclick="cmdFilter_Click" 
                                                Text="กรองข้อมูล" />
                                        </td>
                                    </tr>
                                </table>
                        </asp:Panel>
                    </div>
                </div>
            </td>
          </tr>
          <tr>
            <td >
                <div class="moduleDivSlim1000x450">
                    <div class="moduleDivBottom1000">
                        <asp:Panel ID="Panel7" runat="server" ScrollBars="Auto" Width="1000px">
                            <table align="center" width="980px">
                                <tr>
                                    <td class="tableHeader">
                                        <asp:Label ID="lblHeader" runat="server" Font-Bold="True"></asp:Label>
                                        <telerik:RadTextBox ID="txtSearch0" Runat="server" Visible="False">
                                        </telerik:RadTextBox>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel4" runat="server" Height="350px" ScrollBars="Auto" Width="980px">
                            <table align="center" width="960px">
                                <tr>
                                    <td>
                                        <telerik:RadGrid 
                                            ID="RadGrid1" 
                                            runat="server" 
                                            AllowAutomaticDeletes="True" 
                                            AllowFilteringByColumn="True" 
                                            AllowMultiRowEdit="True" 
                                            AllowMultiRowSelection="True"
                                            AllowPaging="True" AllowSorting="True" 
                                            AutoGenerateColumns="False" 
                                            EnableAJAX="True" 
                                            EnableAJAXLoadingTemplate="True" 
                                            GridLines="None" 
                                            GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                            GroupingSettings-GroupContinuedFormatString="" 
                                            GroupingSettings-GroupContinuesFormatString="" 
                                            GroupingSettings-GroupSplitFormat="" 
                                            OnItemCommand="RadGrid1_ItemCommand" 
                                            ShowStatusBar="true" 
                                            Skin="Outlook" Width="950px">
                                            <MasterTableView 
                                                AllowMultiColumnSorting="True" 
                                                CellSpacing="-1" 
                                                CommandItemDisplay="Top" 
                                                DataKeyNames="Sequence" 
                                                InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                                <CommandItemTemplate>
                                                <table width="100%">
                                                    <tr>
                                                        <td>
                                                                                         
                                                        </td>
                                                    </tr>
                                                </table>
                                            </CommandItemTemplate>
                                                <Columns>
                                                <telerik:GridBoundColumn 
                                                    DataField="Sequence" 
                                                    DataType="System.Int32" 
                                                    HeaderText="Sequence" 
                                                    UniqueName="Sequence" 
                                                    Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn Visible ="true"
                                                    DataField="RetireYear" 
                                                    HeaderText="ปี" 
                                                    UniqueName="RetireYear" 
                                                    FilterControlWidth="100%" 
                                                    AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn
                                                    HeaderText = "ชื่อ - นามสกุล"
                                                    FilterControlWidth = "100%"
                                                    AutoPostBackOnFilter="true" 
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                    <HeaderStyle Width = "200px" />
                                                <ItemTemplate>
                                                <%# Eval("Person.NamePrefix.Name")%> <%# Eval("Person.FirstName")%> &nbsp;<%#Eval("Person.LastName")%> 
                                                </ItemTemplate>
                                                </telerik:GridTemplateColumn>

                                                <telerik:GridBoundColumn 
                                                    DataField="Position.RefNo" 
                                                    HeaderText="เลขที่ตำแหน่ง" 
                                                    UniqueName="Position.RefNo" 
                                                    
                                                    FilterControlWidth="100%"
                                                    AutoPostBackOnFilter="true" 
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                    <HeaderStyle Width = "100px" />
                                                    <ItemStyle HorizontalAlign ="Center" />
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn 
                                                    DataField="Position.Name" 
                                                    HeaderText="ชื่อตำแหน่ง" 
                                                    UniqueName="Position.Name"  
                                                    FilterControlWidth="100%" 
                                                    AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn 
                                                    DataField="Class.Name" 
                                                    HeaderText="ระดับตำแหน่ง" 
                                                    UniqueName="Class.Name"  
                                                    FilterControlWidth="100%" 
                                                    AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                </telerik:GridBoundColumn>
                                                 <telerik:GridBoundColumn 
                                                    DataField="Position.JobSite.Name" 
                                                    HeaderText="สังกัด" 
                                                    UniqueName="Position.JobSite.Name"  
                                                    FilterControlWidth="100%" 
                                                    AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" 
                                                    ShowFilterIcon="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn 
                                                    DataField="Person.BirthDateThai" 
                                                    HeaderText="วัน เดือน ปี เกิด" 
                                                    UniqueName="Person.BirthDateThai"  
                                                    FilterControlWidth="100%" 
                                                    AutoPostBackOnFilter="true"
                                                    CurrentFilterFunction="Contains" 
                                                    DataFormatString ="{0:dd/MM/yyyy}"
                                                    ShowFilterIcon="False">
                                                    <ItemStyle HorizontalAlign ="Center" />
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                                <EditFormSettings EditFormType="WebUserControl">
                                                    <EditColumn UniqueName="EditCommandColumn1">
                                                    </EditColumn>
                                                </EditFormSettings>
                                                <PagerStyle AlwaysVisible="true" FirstPageToolTip="กลับหน้าแรก" 
                                                    LastPageToolTip="ไปหน้าสุดท้าย" Mode="NextPrevNumericAndAdvanced" 
                                                    NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                    PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                            </MasterTableView>
                                            <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                                                EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                                            </ClientSettings>
                                        </telerik:RadGrid>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </div>
            </td>
        </tr>
        
    </table>
    </asp:panel>
    </asp:Content>
